{% if section  and section.type == "footer" %}
  {% assign section = section %}
{% else %}
  {% assign section = theme_config.global.sections.footer %}
{% endif %}
{% assign data = section.settings %}
{% assign blockId = block_id | default : section.block_id %}

<div class="footer" style="--bg: {{data.bg_color}};--color: {{data.font_color}};">
  <div class="top">
    <div class="container_wrapper">
      <div class="top_container flex md:flex-row flex-col flex-wrap md:justify-between md:gap-10 gap-2">
        <oem-menu class="box-border custom_text md:mr-8">
          {% if data.custom_title != '' %}
            <oem-menu-label class='md:hidden'>
              <span>{{data.custom_title}}</span>
            </oem-menu-label>
            <div class='hidden md:block py-2 pc_title'>
              <span>{{data.custom_title}}</span>
            </div>
          {% endif %}
          {% if data.custom_detail != '' %}
            <div class="oem-menu-warp">
              <ul class="flex flex-col">
                <li class="opacity-70">
                  {{data.custom_detail}}
                </li>
              </ul>
            </div>
          {% endif %}
        </oem-menu>
        {% include 'footer_menu',nav_id:data.nav.id %}

      </div>
    </div>
  </div>
  <div class="bottom">
    <div class="container_wrapper">
      <div class="bottom_content flex md:justify-between md:flex-row flex-col-reverse items-center gap-4">
        {% if data.copyright != '' %}
          <div class="copyright md:text-center">
            {{data.copyright | parse_variables}}
          </div>
        {% endif %}
        {% if data.is_currency %}
          <div class="footer_currency flex md:justify-center" style="--currency-bg:{{data.currency_bg}};">
            {% include 'currency',color: data.font_color,bg: data.currency_bg,position: 'top',is_currency_flag: data.is_currency_flag %}
          </div>
        {% endif %}
      </div>
    </div>
  </div>

</div>

{% schema %}
{
	"tag": "footer",
	"class": "footer",
	"is_global": true,
	"name": {
		"zh_CN": "底部",
		"en_US": "Bottom"
	},
	"max_blocks": "0",
	"settings": [
		{
			"type": "card_header",
			"label": {
				"zh_CN": "菜单导航设置",
				"en_US": "Menu Navigation Settings"
			}
		},
		{
			"type": "card_nav",
			"label": {
				"zh_CN": "选择菜单",
				"en_US": "Select menu"
			},
			"default": {
				"id": "",
				"title": ""
			},
			"id": "nav"
		},
		{
			"type": "card_header",
			"label": {
				"zh_CN": "设置",
				"en_US": "Settings"
			}
		},
		{
			"type": "card_input",
			"label": {
				"zh_CN": "自定义文本标题",
				"en_US": "Custom text title"
			},
			"id": "custom_title",
			"default": "About our store"
		},
		{
			"type": "card_text_editor",
			"label": {
				"zh_CN": "自定义文本描述",
				"en_US": "Custom text description"
			},
			"id": "custom_detail",
			"default": "Use this text area to tell your customers about your brand and vision. You can change it in the theme editor"
		},
		{
			"type": "card_color",
			"label": {
				"zh_CN": "背景颜色",
				"en_US": "Background color"
			},
			"default": "#000",
			"id": "bg_color"
		},
		{
			"type": "card_color",
			"label": {
				"zh_CN": "字体颜色",
				"en_US": "Font color"
			},
			"default": "#fff",
			"id": "font_color"
		},
		{
			"type": "card_text_editor",
			"label": {
				"zh_CN": "底部版权",
				"en_US": "Bottom copyright"
			},
			"id": "copyright",
			"default": "Powered by Anonymity"
		},
		{
			"type": "card_switch",
			"label": {
				"zh_CN": "货币切换",
				"en_US": "Currency switch"
			},
			"id": "is_currency",
			"default": true
		},
		{
			"type": "card_switch",
			"label": {
				"zh_CN": "货币前展示国旗",
				"en_US": "Display the national flag in front of the currency"
			},
			"id": "is_currency_flag",
			"default": "1"
		},
		{
			"type": "card_color",
			"id": "currency_bg",
			"label": {
				"zh_CN": "货币背景",
				"en_US": "Currency Background Color"
			},
			"default": "#fdf9ee"
		}
	],
	"blocks": [],
	"default": {
		"settings": {
			"nav": {
				"id": "",
				"title": ""
			},
			"custom_title": "About",
			"custom_detail": "Use this text area to inform your customers about your brand and vision. You can modify it in the theme editor.",
			"bg_color": "#fff",
			"font_color": "#333333",
			"copyright": "@{{ date_year }}{{ storeConfig.name }}{{ current_domain }}",
			"is_currency": true,
			"is_currency_flag": false,
			"currency_bg": "#fdf9ee",
			"is_board": true,
			"is_index_board": false,
			"board_text": "We Free Shipping Worldwide.",
			"board_link": {
				"type": 0,
				"title": "",
				"url": "",
				"source_id": ""
			},
			"board_more_text": "More",
			"board_more_subtitle": "UP TO 50% OFF",
			"board_more_title": "New Arrival Products",
			"board_more_detail": "Pair text with an image to focus on your chosen product, collection, or blog post. Include information about availability, style, or even a review.",
			"board_more_btn_text": "SHOP NOW",
			"board_more_btn_link": {
				"type": 0,
				"title": "",
				"url": "",
				"source_id": ""
			},
			"pc_logo_pic": {
				"src": "",
				"alt": ""
			},
			"pc_logo_w": 60,
			"wap_logo_pic": {
				"src": "",
				"alt": ""
			},
			"wap_logo_w": 60,
			"is_member": true,
			"is_search": true,
			"board_font": "#fff",
			"board_bg": "#121212",
			"nav_bg": "#fff",
			"search_placeholder": "Search...",
			"menu_color": "#121212",
			"is_facebook": true,
			"is_twitter": true,
			"is_pinterest": true,
			"is_instagram": true,
			"is_snapchat": true,
			"is_tiktok": false,
			"is_tumblr": false,
			"is_linkedin": false,
			"is_youtube": false,
			"is_vimeo": false,
			"is_vk": false,
			"is_whatsapp": false
		},
		"blocks": []
	}
}
{% endschema %}